/**
 * 宁观点
 * 
 * 
 * */



import React from 'react';
import { useCallback } from 'react';
import { withRouter } from "react-router-dom";

const NingG = (props) => {
  const { data } = props;
  const gotoDetail = useCallback((data) => {
    props.history.push('/ningGDetail?id=' + data.id)
  }, [props])

  return (
    <div className="NingG-box Qianyan-box" onClick={() => { gotoDetail(data) }}>
      <div className="Qianyan-box-t">
        <div className="Qianyan-box-t-img">
          <img src={data.imgURL} alt="" />
        </div>
        <div className="Qianyan-box-right">
          <p className="Qianyan-title">{data.title}</p>
          <p className="Qianyan-shortIntroduce">{data.shortIntroduce}</p>
        </div>
      </div>
    </div>
  )
}


export default withRouter(React.memo(NingG)); 